
import NetworkTool from './NetworkTool'


interface ComicStyle {
  id: string,
  name: string
}

/**
 * 列表
 */
export interface ComicItemResponse {
  comic_id: string
  title: string
  author: string[]
  vertical_cover: string
  is_finish: number
  last_short_title: string
  styles: ComicStyle[]
  total: number
  last_rank: number
}


export interface EpListItem {
  id: string
  title: string
  cover: string
  ord: number
}

/**
 * 详情
 */
export interface ComicDetailType {
  horizontal_cover: string
  author_name: string[]
  evaluate: string
  total: number
  ep_list: EpListItem[]
}

/**
 * 详情
 */
export interface CommentItem {
  horizontal_cover: string
  author_name: string[]
  evaluate: string
  total: number
  ep_list: EpListItem[]
}

/**
 * 请求列表数据
 */
export const getComicListApi= (params:any) =>
NetworkTool.GET<ComicItemResponse[]>('https://apis.netstart.cn/mbcomic/HomeHot',params)

/**
 * 请求详情数据
 */
export const getComicDetailApi= (params:any) =>
NetworkTool.GET<ComicDetailType>('https://apis.netstart.cn/mbcomic/ComicDetail',params)